﻿#region License
// (c) Intergen.
// This source is subject to the Microsoft Public License (Ms-PL).
// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.
// All other rights reserved.
#endregion

using System;
using System.Xml.Linq;
using System.Collections.Generic;

namespace MediaWiki.Office.Model
{
  public class SmartTag : InlineContent
  {
    public const string LocalName = "smartTag";
    public static readonly XName Name = Document.WordprocessingML + LocalName;

    private List<InlineContent> _content = new List<InlineContent>();

    public List<InlineContent> Content
    {
      get { return _content; }
      set { _content = value; }
    }

    public override InlineContentType ContentType
    {
      get { return InlineContentType.SmartTag; }
    }

    public SmartTag(Paragraph parent, XElement element)
      : base(parent, element)
    {
      if (element == null)
        throw new ArgumentNullException("element");

      _content.AddRange(InlineContent.Create(parent, element.Elements()));
    }
  }
}